function getCurrentPage(){
    let pages = getCurrentPages();
    let curPage = pages[pages.length-1];
    return curPage;
}

function isNativeStringType(type) {
	return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
}

function isEmptyValue(value, type) {
	if (value === undefined || value === null) {
		return true;
	}

	if (type === 'array' && Array.isArray(value) && !value.length) {
		return true;
	}
	
	if(value == '') return true;

	if (isNativeStringType(type) && typeof value === 'string' && !value) {
		return true;
	}

	return false;
}

export default{
	getCurrentPage,
	isEmptyValue
}